package autoz.czt.uml;

import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Class;

public class UmlAssociation {
	private UmlClass source;
	private UmlClass target;
	private String name;
	
	public UmlAssociation(Association a){
		this.name = a.getName();
		this.source = new UmlClass((Class)a.getMemberEnds().get(0).getType()); 
		this.target = new UmlClass((Class)a.getMemberEnds().get(1).getType());
	}
	
	
	public UmlAssociation(String name, UmlClass source, UmlClass target){
		this.name = name;
		this.source = source;
		this.target = target;
	}

	public UmlClass getSource() {
		return source;
	}

	public UmlClass getTarget() {
		return target;
	}

	public String getName() {
		return name;
	}
}
